function [iparam, icov_param, effect, ...
iavg, itime, iconf_obs, iconf_avg, idof, istd, istd_scale, istd_obs, istd_avg, ...
 avg,  time,  conf_obs,  conf_avg, dof2, std2,  std_scale,  std_obs,  std_avg] ...
= smoothitupc (...
get_jacob, extra, ...
time, obs, std, dof, dt, itime, ...
ignore_self, robustify, detrendit, ...
rigorous_residuals, interp_method, idof_method, ...
conf, tail, multiple_correction)
%SMOOTHITUP  Uncertainty-weighted running adjustment, returning confidence intervals.

    if (nargin <  9),  itime = [];  end
    if (nargin < 10),  ignore_self = [];  end
    if (nargin < 11),  robustify = [];  end
    if (nargin < 12),  detrendit = [];  end
    if (nargin < 13),  rigorous_residuals = [];  end
    if (nargin < 14),  interp_method = [];  end
    if (nargin < 15),  idof_method = [];  end
    if (nargin < 16),  conf = [];  end
    if (nargin < 17),  tail = [];  end
    if (nargin < 18),  multiple_correction = [];  end

    [iparam, icov_param, effect, ...
     iavg, itime, istd_obs, istd_avg, idof, istd, istd_scale, ...
      avg,  time,  std_obs,  std_avg,  dof2, std2, std_scale] ...
      = smoothitup (get_jacob, extra, ...
        time, obs, std, dof, dt, itime, ...
        ignore_self, robustify, detrendit, ...
        rigorous_residuals, interp_method, idof_method);
      
     conf_obs = get_pred_lim ( avg,  std_obs, dof2, conf, tail, 'direct', 'direct', multiple_correction);
    iconf_obs = get_pred_lim (iavg, istd_obs, idof, conf, tail, 'direct', 'direct', multiple_correction, numel(avg));
     conf_avg = get_pred_lim ( avg,  std_avg, dof2, conf, tail, 'direct', 'direct', 'none');
    iconf_avg = get_pred_lim (iavg, istd_avg, idof, conf, tail, 'direct', 'direct', 'none');
    
    %TODO: offer option to return tolerance interval instead
    % [hint: matlab fileexchange (sheffe's formulation)]
end

